/*
 * @Author: szx
 * @Date: 2022-05-10 14:35:49
 * @LastEditTime: 2022-05-10 14:40:00
 * @Description:
 * @FilePath: \leetcode\面试题\01\03\03.js
 */
/**
 * @param {string} s
 * @param {number} length
 * @return {string}
 */
var replaceSpaces = function (s, length) {
    if (s.length != length) s = s.substring(0, length);
    return s.replace(/ /g, '%20');
};
